<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>
<%@ page import="itsos.service.DisplayRepositoryTree"%>
<%@ page import="java.util.*"%>
<%@ page import="org.tmatesoft.svn.core.SVNDirEntry"%>
<%@ page import="org.tmatesoft.svn.core.SVNNodeKind"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Insert title here</title>
</head>
<body>
<%
	String url = request.getParameter("url");
	String name = request.getParameter("name");
	String password = request.getParameter("password");
	String[] br = request.getParameterValues("branch");
	Iterator co = DisplayRepositoryTree.FullPac(url,name,password);
	Iterator[] iterator = new Iterator[br.length];
	for(int i=0;i<br.length;i++)
	{
		String clonurl = url + "/" + br[i];
		
		iterator[i] = DisplayRepositoryTree.FullPac(clonurl, name, password);
	}	
	while(co.hasNext())
	{
		SVNDirEntry entry = (SVNDirEntry)co.next();
		if(entry.getKind()==SVNNodeKind.DIR)
		{
			%>
				<%=entry.getName()%><br/>
				
				
			<% 
			for(int i=0;i<br.length;i++)
			{
				
				if(br[i].equals(entry.getName()))
				{
					while(iterator[i].hasNext())
					{
						SVNDirEntry vs = (SVNDirEntry)iterator[i].next();
						if(vs.getKind()==SVNNodeKind.DIR)
						{
							%>
								<%="&nbsp;&nbsp;&nbsp;&nbsp;" + vs.getName()%><br/>
							<% 
						}
					}
				}
			}
		}
	}
%>



</body>
</html>